using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Andrewl.XnaHelpers.Conversion
{
    public static class Conversion
    {
        private static Vector2 tempV2;

        private static Vector3 tempV3;

        private static Vector4 tempV4;

        private static Point tempPoint;

        private static Color tempColor;

        public static Vector2 PointToVector2(Point point)
        {
            tempV2 = new Vector2(point.X, point.Y);
            return tempV2;
        }

        public static Point Vector2ToPoint(Vector2 vector)
        {
            tempPoint = new Point((int)vector.X, (int)vector.Y);
            return tempPoint;
        }

        public static Color Vector3ToColor(Vector3 vector)
        {
            tempColor = new Color((byte)vector.X, (byte)vector.Y, (byte)vector.Z, 255);
            return tempColor;
        }

        public static Color Vector4ToColor(Vector4 vector)
        {
            tempColor = new Color((byte)vector.X, (byte)vector.Y, (byte)vector.Z, (byte)vector.W);
            return tempColor;
        }

        public static Vector2 ColorToVector2(Color color)
        {
            tempV2.X = color.R;
            tempV2.Y = color.G;
            return tempV2;
        }

        public static Vector3 ColorToVector3(Color color)
        {
            tempV3.X = color.R;
            tempV3.Y = color.G;
            tempV3.Z = color.B;
            return tempV3;
        }

        public static Vector4 ColorToVector4(Color color)
        {
            tempV4.X = color.R;
            tempV4.Y = color.G;
            tempV4.Z = color.B;
            tempV4.W = color.A;
            return tempV4;
        }


        
    }
}